<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  document.write("3秒跳转到首页。。。")
  setTimeout(function () {
    alert("点击确定跳转啦。。。")
    location.href = "https://www.baidu.com";
  }, 3000);
</script>
</body>
</html>